package cn.hxzy.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Component
public interface ZDYMapper {
    @Select("select submit_count from task_manager where student_id=#{userId} and task_id=#{taskId}")
    Integer countByStudentIdAndTaskId(int userId, int taskId);

    @Update("UPDATE task_manager SET submit_count=#{submitCount} WHERE student_id=#{userId} and task_id=#{taskId}")
    Integer updatecount(int userId, int taskId, Integer submitCount);
}
